package com.be.beadmin.service.config;

import lombok.Data;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 *  @Description 线程池配置
 *  @author xunzhang
 *  @Date 2020.08.30 13:35
 */
@ConditionalOnProperty(name = "thread.pool.open", havingValue = "true")
@Configuration
@ConfigurationProperties(prefix="thread.pool")
@Data
public class ThreadPoolConfig {

	/** 核心线程数 */
	private int corePoolSize;
	
	/** 最大线程数 */
	private int maximumPoolSize;
	
	/** 非核心线程生命周期（秒） */
	private long keepAliveTime;
	
	/** 排队深度 */
	private int threadQueueSize;
}
